// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
	env:'mupp-5gs2863z7cf6873f'
})


// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  const db=cloud.database()
	const comment=db.collection('comment')	
	let _id=event._id
	let res=await comment.where({
		_id
	}).remove()
	console.log('删除结果',res)
	let result=res.stats.removed
	if(result>=1){
		result=true
	}else{
		result=false
	}
	return {
		result
	}
}